Page({
  data: {
    title: '支付成功',
    subTitle: '',
    type: 'success',
    seconds:5
  },
  onLoad() {
    this.countDown()
  },
  countDown(){
    let timer = setInterval(()=>{
      let count = this.data.seconds;
      count--;
      this.setData({
        seconds:count
      })
      if(this.data.seconds<=0){
        clearInterval(timer)
        my.redirectTo({ url: '../order/order' });
      }
    },1000) 
  }
});
